Object.prototype[Symbol.iterator] = function() {
  var self = this
  var keys = Object.keys(self)
  var index = 0
  return {
    next: function() {
      if(index < keys.length) {
        return {
          value: self[keys[index++]],
          done: false
        }
      } else {
        return {
          value: undefined,
          done: true
        }
      }
    }
  }
}
let obj = {
  name: 'zzt',
  age: 180
}
for(let val of obj) {
  console.log(val);
  
}